import com.demo.McpServerApplication;
import com.demo.domain.model.WeiXinNoticeFunctionRequest;
import com.demo.domain.model.WeiXinNoticeFunctionResponse;
import com.demo.domain.service.WeiXinNoticeService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.IOException;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest(classes = McpServerApplication.class)
public class ServiceTest {
    @Resource
    private WeiXinNoticeService service;

    @Test
    public void test() throws IOException {
        WeiXinNoticeFunctionRequest request = new WeiXinNoticeFunctionRequest();
        request.setPlatform("aaa");
        request.setSubject("bb");
        request.setDescription("cc");
        request.setJumpUrl("https://www.baidu.com");
        WeiXinNoticeFunctionResponse response = service.weixinNotice(request);
        log.info("response={}", response);
    }
}
